import React from 'react';
import PropTypes from 'prop-types'

const TodoHeader = (props) => {
    
    return (
        <div>
            <h1>{props.title}</h1>
            {/* <p>{props.children}</p> */}
            <p>{props.desc}</p>
            <p>{props.x + props.y}</p>
        </div>
    );
}

TodoHeader.propTypes = {
    title: PropTypes.string,
    desc: PropTypes.string,
    x:PropTypes.number.isRequired,
    y:PropTypes.number.isRequired
}
TodoHeader.defaultProps = {
    title: '今日待办项',
    desc: '今日事 今日毕',
    x:1,
    y:2
}
export default TodoHeader;

